package com.baor.controller;
import com.baor.domain.HdddCustomerDTO;
import com.baor.util.R;
import com.baor.domain.Hddd;
import com.baor.service.HdddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping(value ="/hddd")
public class HdddController {
   @Autowired
    private HdddService hdddService;
   @GetMapping("init")
    public R init(){
       List<HdddCustomerDTO>jgj= hdddService.hddlist();
       return R.ok(jgj);
    }

    @GetMapping("find")
    public R find(
            @RequestParam(name = "serch") String key

    ) {
        List<HdddCustomerDTO> cxjg = hdddService.findByPhoneAndName(key);
        return R.ok(cxjg);
    }

//phone
}
